package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 同步任务对象 sync_task
 * 
 * @author ruoyi
 */
public class SyncTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 同步任务ID */
    private Long syncId;

    /** 任务名称 */
    @Excel(name = "任务名称")
    private String syncName;

    /** 同步类型（0数据库同步 1文件同步） */
    @Excel(name = "同步类型", readConverterExp = "0=数据库同步,1=文件同步")
    private String syncType;

    /** 来源服务器ID */
    private Long sourceServerId;

    /** 来源服务器名称 */
    @Excel(name = "来源服务器")
    private String sourceServer;

    /** 目标服务器ID */
    private Long targetServerId;

    /** 目标服务器名称 */
    @Excel(name = "目标服务器")
    private String targetServer;

    /** Cron执行表达式 */
    @Excel(name = "执行周期")
    private String cronExpression;

    /** 同步策略（0=全量覆盖,1=增量更新,2=条件筛选） */
    private String syncStrategy;

    /** 筛选条件 */
    private String filterCondition;

    /** 源数据库 */
    private String sourceDb;

    /** 源数据表，多个用逗号分隔 */
    private String sourceTables;

    /** 目标数据库 */
    private String targetDb;

    /** 源文件路径 */
    private String sourcePath;

    /** 目标路径 */
    private String targetPath;

    /** 文件类型，多个用逗号分隔 */
    private String fileTypes;

    /** 是否包含子目录（0否 1是） */
    private Integer includeSubdirectories;

    /** 文件同步策略（0=完全覆盖,1=增量更新,2=差异同步） */
    private String fileSyncStrategy;

    /** 最后执行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "最后执行时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date lastRunTime;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    public void setSyncId(Long syncId) 
    {
        this.syncId = syncId;
    }

    public Long getSyncId() 
    {
        return syncId;
    }
    
    public void setSyncName(String syncName) 
    {
        this.syncName = syncName;
    }

    public String getSyncName() 
    {
        return syncName;
    }
    
    public void setSyncType(String syncType) 
    {
        this.syncType = syncType;
    }

    public String getSyncType() 
    {
        return syncType;
    }
    
    public void setSourceServerId(Long sourceServerId) 
    {
        this.sourceServerId = sourceServerId;
    }

    public Long getSourceServerId() 
    {
        return sourceServerId;
    }
    
    public void setSourceServer(String sourceServer) 
    {
        this.sourceServer = sourceServer;
    }

    public String getSourceServer() 
    {
        return sourceServer;
    }
    
    public void setTargetServerId(Long targetServerId) 
    {
        this.targetServerId = targetServerId;
    }

    public Long getTargetServerId() 
    {
        return targetServerId;
    }
    
    public void setTargetServer(String targetServer) 
    {
        this.targetServer = targetServer;
    }

    public String getTargetServer() 
    {
        return targetServer;
    }
    
    public void setCronExpression(String cronExpression) 
    {
        this.cronExpression = cronExpression;
    }

    public String getCronExpression() 
    {
        return cronExpression;
    }
    
    public void setSyncStrategy(String syncStrategy) 
    {
        this.syncStrategy = syncStrategy;
    }

    public String getSyncStrategy() 
    {
        return syncStrategy;
    }
    
    public void setFilterCondition(String filterCondition) 
    {
        this.filterCondition = filterCondition;
    }

    public String getFilterCondition() 
    {
        return filterCondition;
    }
    
    public void setSourceDb(String sourceDb) 
    {
        this.sourceDb = sourceDb;
    }

    public String getSourceDb() 
    {
        return sourceDb;
    }
    
    public void setSourceTables(String sourceTables) 
    {
        this.sourceTables = sourceTables;
    }

    public String getSourceTables() 
    {
        return sourceTables;
    }
    
    public void setTargetDb(String targetDb) 
    {
        this.targetDb = targetDb;
    }

    public String getTargetDb() 
    {
        return targetDb;
    }
    
    public void setSourcePath(String sourcePath) 
    {
        this.sourcePath = sourcePath;
    }

    public String getSourcePath() 
    {
        return sourcePath;
    }
    
    public void setTargetPath(String targetPath) 
    {
        this.targetPath = targetPath;
    }

    public String getTargetPath() 
    {
        return targetPath;
    }
    
    public void setFileTypes(String fileTypes) 
    {
        this.fileTypes = fileTypes;
    }

    public String getFileTypes() 
    {
        return fileTypes;
    }
    
    public void setIncludeSubdirectories(Integer includeSubdirectories) 
    {
        this.includeSubdirectories = includeSubdirectories;
    }

    public Integer getIncludeSubdirectories() 
    {
        return includeSubdirectories;
    }
    
    public void setFileSyncStrategy(String fileSyncStrategy) 
    {
        this.fileSyncStrategy = fileSyncStrategy;
    }

    public String getFileSyncStrategy() 
    {
        return fileSyncStrategy;
    }
    
    public void setLastRunTime(Date lastRunTime) 
    {
        this.lastRunTime = lastRunTime;
    }

    public Date getLastRunTime() 
    {
        return lastRunTime;
    }
    
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("syncId", getSyncId())
            .append("syncName", getSyncName())
            .append("syncType", getSyncType())
            .append("sourceServerId", getSourceServerId())
            .append("sourceServer", getSourceServer())
            .append("targetServerId", getTargetServerId())
            .append("targetServer", getTargetServer())
            .append("cronExpression", getCronExpression())
            .append("syncStrategy", getSyncStrategy())
            .append("filterCondition", getFilterCondition())
            .append("sourceDb", getSourceDb())
            .append("sourceTables", getSourceTables())
            .append("targetDb", getTargetDb())
            .append("sourcePath", getSourcePath())
            .append("targetPath", getTargetPath())
            .append("fileTypes", getFileTypes())
            .append("includeSubdirectories", getIncludeSubdirectories())
            .append("fileSyncStrategy", getFileSyncStrategy())
            .append("lastRunTime", getLastRunTime())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
} 